package com.wl.login.bean;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

import javax.annotation.PostConstruct;

@Data
@ConfigurationProperties(prefix = "login")
public class LoginProperties {
    String userClass;
    String userTable;
    String usernameColumn;
    String passwordColumn;
    String emailColumn;
    String encryption;
    String sessionKey;
    String[] loginScope;

    Class userClassObject;

    // IOC bean装载之后
    @PostConstruct
    void myInit() throws ClassNotFoundException {
        userClassObject = Class.forName(getUserClass());
    }
}
